# Maintainer:
pkgname=libjodycode
pkgver=3.1.1
pkgrel=0
pkgdesc="Shared code used by several utilities written by Jody Bruchon"
url="https://github.com/jbruchon/libjodycode"
arch="all"
license="MIT"
subpackages="$pkgname-dev $pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://codeberg.org/jbruchon/libjodycode/archive/refs/tags/v$pkgver.tar.gz"
options="!check" # no tests
builddir="$srcdir/$pkgname"

build() {
	make \
		NO_SIMD=1 \
		NO_SSE2=1 \
		NO_AVX2=1 \
		CFLAGS="$CFLAGS -DNO_SSE2 -DNO_SIMD -DNO_AVX2 -flto=auto"
}

package() {
	make DESTDIR="$pkgdir" PREFIX=/usr install
	rm -v "$pkgdir"/usr/lib/*.a
}

sha512sums="
cd388b26e77af64b9c575df75f0ab39775c29713948f671e50be5485c9be3bd180f232a185891640a372e7069a6807368c3599cce399901d9e1102a8ce969c11  libjodycode-3.1.1.tar.gz
"
